home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
music
/
5mods_2.arj
/
BJ002.MOD
< prev
next >
Wrap
Text File
|
1994-01-20
|
5KB
|
122 lines
─────────────────────────────────────────────────────────────────────────┐
│ Mod Name : BJ002.MOD Mod Author: 2@2504 WWIVnet │
│ Difficulty : ███░░░░░░░ 2@2504 CHAOSnet │
│ WWIV Version : 4.23 2@1 BJnet │
│ Mod Date : 01/02/94 │
│ Files Affected: BBS.C, LILO.C, COM.C, VARS.H │
│ Description : Gives users visible registration levels/ranks! │
└────────────────────────────────────────────────────────────────────────┘
Long Description:
This mod will give your users access levels like in WildCat!.
It doesn't even modify the user records (yaay!); it does modify VARS.H
so you'll have to recompile.
Notes:
You'll need to change the security levels to whatever you would like
to use (see note in mod).
Disclaimer:
I won't even degrade myself by posting one...
Key:
/*===*/ Existing line
/*+++*/ Add line
/*###*/ Modify line
/*---*/ Remove line
═══════════════════════════{ Step 1 }═══════════════════════════════════
Shift that source into reverse (ie back it up!).
═══════════════════════════{ Step 2 }═══════════════════════════════════
Open VARS.H and search for "nete[5]". Make the following changes:
/*===*/ ver_no2[51],wwiv_net_no[20], xdate[9], *xenviron[50],
/*###*/ dlfn[81],edlfn[81], nete[5], rank[50]; /* Add rank[50] */
/*===*/
/*===*/ __EXTRN__ unsigned char actsl, andwith, checksum;
Save/close VARS.H.
═══════════════════════════{ Step 3 }═══════════════════════════════════
Open BBS.C and search for "print_net_listing(0)". Add the following:
/*===*/ print_net_listing(0);
/*+++*/ if (strcmp(s,"RANK")==0) {
/*+++*/ rank_em();
/*+++*/ nl();
/*+++*/ npr("Your User Status is: %s",rank);
/*+++*/ nl();
/*+++*/ }
/*===*/ if (strcmp(s,"QSCAN")==0) {
Save/close BBS.C.
═══════════════════════════{ Step 4 }═══════════════════════════════════
Open LILO.C and search for "useron=1;". Add the following:
/*===*/ hangup=1;
/*===*/ return;
/*===*/ }
/*+++*/ rank_em(); /* Added by BJ002.MOD */
/*===*/ useron=1;
/*===*/ write_inst(INST_LOC_LOGON,0,INST_FLAGS_ONLINE);
Search for "pl(nam(&thisuser,usernum));" a little further down. Add this:
/*===*/ pl(nam(&thisuser,usernum));
/*+++*/ npr("Access............ %s\n\r",rank); /* Add me */
/*===*/ outstr(get_string(363)); npr("%d\r\n", (int) ((nsl()+30)/60.0));
Save/close LILO.C.
═══════════════════════════{ Step 5 }═══════════════════════════════════
Open COM.C and add the following function at the end:
------------------------------------------------------------------------
/* BJ002.MOD block begin */
void rank_em(void)
{
if (thisuser.sl==255)
sprintf(rank,"System Operator");
if (thisuser.sl<=254 && thisuser.sl>=200)
sprintf(rank,"Assistant System Operator");
if (thisuser.sl<200 && thisuser.sl>=175) /* Customize SL's */
sprintf(rank,"Level 5 [V.I.P. User]");
if (thisuser.sl<175 && thisuser.sl>=150) /* Customize SL's */
sprintf(rank,"Level 4 [Registered User]");
if (thisuser.sl<150 && thisuser.sl>=100) /* Customize SL's */
sprintf(rank,"Level 3 [Registered User]");
if (thisuser.sl<100 && thisuser.sl>=75) /* Customize SL's */
sprintf(rank,"Level 2 [Registered User]");
if (thisuser.sl<75 && thisuser.sl>=50) /* Customize SL's */
sprintf(rank,"Level 1 [Registered User]");
if (thisuser.sl<50 && thisuser.sl>=25) /* Customize SL's */
sprintf(rank,"Level 0 [Unregistered User]");
if (thisuser.sl==20) /* Customize SL's */
sprintf(rank,"*User on Probation*");
if (thisuser.sl==10) /* Customize SL's */
sprintf(rank,"New User");
if (thisuser.sl<10) /* Customize SL's */
sprintf(rank,"<*> SUSPENDED USER <*>");
}
/* BJ002.MOD block end */
------------------------------------------------------------------------
Save/close COM.C.
═══════════════════════════{ End Mod }══════════════════════════════════
I would suggest running a MAKE FCNS here because you must recompile the
BBS anyway. Please drop me a line (2@2504 WWIVnet / CHAOSnet) and let me
know that you're using this mod, or what you think.
You can add the rank variable to just about anywere... SysOplog, message
headers, user lists, etc.